home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 22 / AMUG_22-4.ISO / Files IV / Prog / T / TinyTools-2.sit / TinyTools / StdData.h < prev    next >
MacBinary  |  1997-10-07  |  4.5 KB  |  [TEXT/MPS ]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
1% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Tue Oct 7 03:01:06 1997, modified Tue Oct 7 03:01:06 1997, creator 'MPS ', type ASCII, 3921 bytes "StdData.h" , at 0xfd1 428 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% dearkID deark: macbinary default
100% lsar MacBinary default
100% librempegprobeID NGC (Nintendo DSP Standard) (ngcdspstd) default (weak)


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MPS ]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 09 53 74 64 44 61 74 | 61 2e 68 00 00 00 00 00 |..StdDat|a.h.....|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 01 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 0f 51 00 | 00 01 ac b0 5f 8e b2 b0 |......Q.|...._...|
|00000060| 5f 8e b2 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |_.......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 c9 b8 00 00 |........|........|
|00000080| 2f 2a 09 73 69 6d 70 6c | 65 20 72 6f 75 74 69 6e |/*.simpl|e routin|
|00000090| 65 73 20 66 6f 72 20 6d | 61 6e 61 67 69 6e 67 20 |es for m|anaging |
|000000a0| 73 6d 61 6c 6c 20 63 6f | 6c 6c 65 63 74 69 6f 6e |small co|llection|
|000000b0| 73 20 6f 66 20 76 61 72 | 69 61 62 6c 65 20 6c 65 |s of var|iable le|
|000000c0| 6e 67 74 68 0d 09 72 65 | 63 6f 72 64 73 20 69 6e |ngth..re|cords in|
|000000d0| 20 64 61 74 61 20 66 69 | 6c 65 73 20 61 73 73 6f | data fi|les asso|
|000000e0| 63 69 61 74 65 64 20 77 | 69 74 68 20 6b 65 79 73 |ciated w|ith keys|
|000000f0| 2c 20 6a 75 73 74 20 61 | 6e 20 69 64 65 61 2e 2e |, just a|n idea..|
|00000100| 2e 0d 09 43 6f 70 79 72 | 69 67 68 74 20 28 63 29 |...Copyr|ight (c)|
|00000110| 20 31 39 39 37 20 62 79 | 20 4a 6f 68 6e 20 4d 6f | 1997 by| John Mo|
|00000120| 6e 74 62 72 69 61 6e 64 | 2e 20 20 41 6c 6c 20 52 |ntbriand|. All R|
|00000130| 69 67 68 74 73 20 52 65 | 73 65 72 76 65 64 2e 0d |ights Re|served..|
|00000140| 09 50 65 72 6d 69 73 73 | 69 6f 6e 20 67 72 61 6e |.Permiss|ion gran|
|00000150| 74 65 64 20 66 6f 72 20 | 70 75 62 6c 69 63 20 75 |ted for |public u|
|00000160| 73 65 2e 0d 09 44 69 73 | 74 72 69 62 75 74 65 20 |se...Dis|tribute |
|00000170| 66 72 65 65 6c 79 20 69 | 6e 20 61 72 65 61 73 20 |freely i|n areas |
|00000180| 77 68 65 72 65 20 74 68 | 65 20 6c 61 77 73 20 6f |where th|e laws o|
|00000190| 66 20 63 6f 70 79 72 69 | 67 68 74 20 61 70 70 6c |f copyri|ght appl|
|000001a0| 79 2e 0d 09 55 53 45 20 | 41 54 20 59 4f 55 52 20 |y...USE |AT YOUR |
|000001b0| 4f 57 4e 20 52 49 53 4b | 2e 0d 09 44 4f 20 4e 4f |OWN RISK|...DO NO|
|000001c0| 54 20 44 49 53 54 52 49 | 42 55 54 45 20 4d 4f 44 |T DISTRI|BUTE MOD|
|000001d0| 49 46 49 45 44 20 43 4f | 50 49 45 53 2e 0d 09 43 |IFIED CO|PIES...C|
|000001e0| 6f 6d 6d 65 6e 74 73 2f | 71 75 65 73 74 69 6f 6e |omments/|question|
|000001f0| 73 2f 70 6f 73 74 63 61 | 72 64 73 20 74 6f 20 74 |s/postca|rds to t|
|00000200| 68 65 20 61 75 74 68 6f | 72 20 61 74 20 74 68 65 |he autho|r at the|
|00000210| 20 61 64 64 72 65 73 73 | 3a 0d 09 09 4a 6f 68 6e | address|:...John|
|00000220| 20 4d 6f 6e 74 62 72 69 | 61 6e 64 0d 09 09 50 2e | Montbri|and...P.|
|00000230| 4f 2e 20 42 6f 78 2e 20 | 31 31 33 33 0d 09 09 53 |O. Box. |1133...S|
|00000240| 61 73 6b 61 74 6f 6f 6e | 20 53 61 73 6b 61 74 63 |askatoon| Saskatc|
|00000250| 68 65 77 61 6e 20 43 61 | 6e 61 64 61 0d 09 09 53 |hewan Ca|nada...S|
|00000260| 37 4b 20 33 4e 32 0d 09 | 6f 72 20 62 79 20 65 6d |7K 3N2..|or by em|
|00000270| 61 69 6c 20 61 74 3a 0d | 09 09 74 69 6e 79 6a 6f |ail at:.|..tinyjo|
|00000280| 68 6e 40 73 6b 2e 73 79 | 6d 70 61 74 69 63 6f 2e |hn@sk.sy|mpatico.|
|00000290| 63 61 0d 09 49 66 20 79 | 6f 75 20 77 6f 75 6c 64 |ca..If y|ou would|
|000002a0| 20 6c 69 6b 65 20 74 6f | 20 68 61 76 65 3a 0d 09 | like to| have:..|
|000002b0| 09 74 65 63 68 6e 69 63 | 61 6c 20 73 75 70 70 6f |.technic|al suppo|
|000002c0| 72 74 20 72 65 67 61 72 | 64 69 6e 67 20 74 68 69 |rt regar|ding thi|
|000002d0| 73 20 66 69 6c 65 2c 20 | 73 65 6e 64 20 61 20 70 |s file, |send a p|
|000002e0| 6f 73 74 63 61 72 64 2e | 0d 09 73 65 65 20 61 6c |ostcard.|..see al|
|000002f0| 73 6f 3a 0d 09 09 68 74 | 74 70 3a 2f 2f 77 77 77 |so:...ht|tp://www|
|00000300| 33 2e 73 6b 2e 73 79 6d | 70 61 74 69 63 6f 2e 63 |3.sk.sym|patico.c|
|00000310| 61 2f 74 69 6e 79 6a 6f | 68 6e 0d 2a 2f 0d 0d 23 |a/tinyjo|hn.*/..#|
|00000320| 69 66 6e 64 65 66 20 5f | 5f 53 54 44 44 41 54 41 |ifndef _|_STDDATA|
|00000330| 5f 5f 0d 23 64 65 66 69 | 6e 65 20 5f 5f 53 54 44 |__.#defi|ne __STD|
|00000340| 44 41 54 41 5f 5f 0d 0d | 23 69 6e 63 6c 75 64 65 |DATA__..|#include|
|00000350| 20 3c 54 79 70 65 73 2e | 68 3e 0d 23 69 6e 63 6c | <Types.|h>.#incl|
|00000360| 75 64 65 20 3c 46 69 6c | 65 73 2e 68 3e 0d 0d 23 |ude <Fil|es.h>..#|
|00000370| 64 65 66 69 6e 65 20 6b | 53 74 64 44 61 74 61 56 |define k|StdDataV|
|00000380| 65 72 73 69 6f 6e 20 30 | 78 44 45 41 46 30 31 30 |ersion 0|xDEAF010|
|00000390| 30 0d 0d 2f 2a 20 6d 61 | 70 20 72 65 63 6f 72 64 |0../* ma|p record|
|000003a0| 73 20 61 73 73 6f 63 69 | 61 74 65 20 64 61 74 61 |s associ|ate data|
|000003b0| 20 77 69 74 68 20 69 64 | 20 6e 75 6d 62 65 72 73 | with id| numbers|
|000003c0| 20 2a 2f 0d 74 79 70 65 | 64 65 66 20 73 74 72 75 | */.type|def stru|
|000003d0| 63 74 20 7b 0d 09 6c 6f | 6e 67 20 69 64 3b 0d 09 |ct {..lo|ng id;..|
|000003e0| 6c 6f 6e 67 20 73 69 7a | 65 3b 0d 09 6c 6f 6e 67 |long siz|e;..long|
|000003f0| 20 6f 66 66 73 65 74 3b | 0d 7d 20 53 44 4d 61 70 | offset;|.} SDMap|
|00000400| 52 65 63 3b 0d 0d 2f 2a | 20 69 6e 2d 6d 65 6d 6f |Rec;../*| in-memo|
|00000410| 72 79 20 66 79 6c 65 20 | 72 65 63 6f 72 64 20 73 |ry fyle |record s|
|00000420| 74 72 75 63 74 75 72 65 | 20 2a 2f 0d 74 79 70 65 |tructure| */.type|
|00000430| 64 65 66 20 73 74 72 75 | 63 74 20 7b 0d 09 4f 53 |def stru|ct {..OS|
|00000440| 54 79 70 65 20 66 69 6c | 65 5f 74 79 70 65 3b 09 |Type fil|e_type;.|
|00000450| 2f 2a 20 66 69 6c 65 20 | 74 79 70 65 20 2a 2f 0d |/* file |type */.|
|00000460| 09 4f 53 54 79 70 65 20 | 66 69 6c 65 5f 63 72 65 |.OSType |file_cre|
|00000470| 61 74 6f 72 3b 20 09 2f | 2a 20 66 69 6c 65 20 63 |ator; ./|* file c|
|00000480| 72 65 61 74 6f 72 20 2a | 2f 0d 09 6c 6f 6e 67 20 |reator *|/..long |
|00000490| 69 64 5f 63 6f 75 6e 74 | 65 72 3b 09 2f 2a 20 69 |id_count|er;./* i|
|000004a0| 64 20 63 6f 75 6e 74 65 | 72 2c 20 69 6e 69 74 69 |d counte|r, initi|
|000004b0| 61 6c 6c 79 20 31 20 69 | 6e 63 72 65 6d 65 6e 74 |ally 1 i|ncrement|
|000004c0| 65 64 20 66 6f 72 20 65 | 61 63 68 20 6e 65 77 20 |ed for e|ach new |
|000004d0| 72 65 63 6f 72 64 20 2a | 2f 0d 09 6c 6f 6e 67 20 |record *|/..long |
|000004e0| 62 61 73 65 5f 69 64 3b | 20 2f 2a 20 62 61 73 65 |base_id;| /* base|
|000004f0| 20 69 64 20 6e 75 6d 62 | 65 72 20 73 65 74 20 62 | id numb|er set b|
|00000500| 79 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 20 2a 2f |y applic|ation */|
|00000510| 0d 09 6c 6f 6e 67 20 6d | 61 70 5f 73 69 7a 65 3b |..long m|ap_size;|
|00000520| 20 2f 2a 20 6e 75 6d 62 | 65 72 20 6f 66 20 72 65 | /* numb|er of re|
|00000530| 63 6f 72 64 73 20 69 6e | 20 74 68 65 20 66 69 6c |cords in| the fil|
|00000540| 65 20 6d 61 70 20 2a 2f | 0d 09 6c 6f 6e 67 20 64 |e map */|..long d|
|00000550| 61 74 61 5f 62 79 74 65 | 73 3b 20 2f 2a 20 6e 75 |ata_byte|s; /* nu|
|00000560| 6d 62 65 72 20 6f 66 20 | 64 61 74 61 20 62 79 74 |mber of |data byt|
|00000570| 65 73 20 69 6e 20 74 68 | 65 5f 64 61 74 61 20 2a |es in th|e_data *|
|00000580| 2f 0d 09 75 6e 73 69 67 | 6e 65 64 20 63 68 61 72 |/..unsig|ned char|
|00000590| 20 2a 2a 74 68 65 5f 64 | 61 74 61 3b 20 2f 2a 20 | **the_d|ata; /* |
|000005a0| 64 61 74 61 20 62 75 66 | 66 65 72 20 2a 2f 0d 09 |data buf|fer */..|
|000005b0| 53 44 4d 61 70 52 65 63 | 20 6d 61 70 5b 31 5d 3b |SDMapRec| map[1];|
|000005c0| 20 2f 2a 20 6d 61 70 20 | 72 65 63 6f 72 64 73 2c | /* map |records,|
|000005d0| 20 69 6e 20 61 73 63 65 | 6e 64 69 6e 67 20 6f 72 | in asce|nding or|
|000005e0| 64 65 72 20 62 79 20 49 | 44 20 6e 75 6d 62 65 72 |der by I|D number|
|000005f0| 20 2a 2f 0d 7d 20 53 44 | 46 69 6c 65 52 65 63 2c | */.} SD|FileRec,|
|00000600| 20 2a 2a 53 44 46 69 6c | 65 3b 0d 0d 09 2f 2a 20 | **SDFil|e;.../* |
|00000610| 66 69 6c 65 20 68 65 61 | 64 65 72 20 73 74 72 75 |file hea|der stru|
|00000620| 63 74 75 72 65 20 2a 2f | 0d 74 79 70 65 64 65 66 |cture */|.typedef|
|00000630| 20 73 74 72 75 63 74 20 | 7b 0d 09 75 6e 73 69 67 | struct |{..unsig|
|00000640| 6e 65 64 20 6c 6f 6e 67 | 20 76 65 72 73 69 6f 6e |ned long| version|
|00000650| 3b 20 2f 2a 20 66 69 6c | 65 20 76 65 72 73 69 6f |; /* fil|e versio|
|00000660| 6e 20 6b 53 74 64 44 61 | 74 61 56 65 72 73 69 6f |n kStdDa|taVersio|
|00000670| 6e 20 2a 2f 0d 09 4f 53 | 54 79 70 65 20 66 69 6c |n */..OS|Type fil|
|00000680| 65 5f 74 79 70 65 3b 09 | 2f 2a 20 66 69 6c 65 20 |e_type;.|/* file |
|00000690| 74 79 70 65 20 2a 2f 0d | 09 4f 53 54 79 70 65 20 |type */.|.OSType |
|000006a0| 66 69 6c 65 5f 63 72 65 | 61 74 6f 72 3b 2f 2a 20 |file_cre|ator;/* |
|000006b0| 66 69 6c 65 20 63 72 65 | 61 74 6f 72 20 2a 2f 0d |file cre|ator */.|
|000006c0| 09 6c 6f 6e 67 20 69 64 | 5f 63 6f 75 6e 74 65 72 |.long id|_counter|
|000006d0| 3b 09 2f 2a 20 69 64 20 | 63 6f 75 6e 74 65 72 2c |;./* id |counter,|
|000006e0| 20 69 6e 69 74 69 61 6c | 6c 79 20 31 20 69 6e 63 | initial|ly 1 inc|
|000006f0| 72 65 6d 65 6e 74 65 64 | 20 66 6f 72 20 65 61 63 |remented| for eac|
|00000700| 68 20 6e 65 77 20 72 65 | 63 6f 72 64 20 2a 2f 0d |h new re|cord */.|
|00000710| 09 6c 6f 6e 67 20 62 61 | 73 65 5f 69 64 3b 09 2f |.long ba|se_id;./|
|00000720| 2a 20 62 61 73 65 20 69 | 64 20 6e 75 6d 62 65 72 |* base i|d number|
|00000730| 20 73 65 74 20 62 79 20 | 61 70 70 6c 69 63 61 74 | set by |applicat|
|00000740| 69 6f 6e 20 2a 2f 0d 09 | 6c 6f 6e 67 20 6d 61 70 |ion */..|long map|
|00000750| 5f 73 69 7a 65 3b 20 2f | 2a 20 6e 75 6d 62 65 72 |_size; /|* number|
|00000760| 20 6f 66 20 72 65 63 6f | 72 64 73 20 69 6e 20 74 | of reco|rds in t|
|00000770| 68 65 20 66 69 6c 65 20 | 6d 61 70 20 2a 2f 0d 09 |he file |map */..|
|00000780| 6c 6f 6e 67 20 64 61 74 | 61 5f 62 79 74 65 73 3b |long dat|a_bytes;|
|00000790| 20 2f 2a 20 6e 75 6d 62 | 65 72 20 6f 66 20 64 61 | /* numb|er of da|
|000007a0| 74 61 20 62 79 74 65 73 | 20 69 6e 20 74 68 65 5f |ta bytes| in the_|
|000007b0| 64 61 74 61 20 2a 2f 0d | 09 6c 6f 6e 67 20 75 6e |data */.|.long un|
|000007c0| 75 73 65 64 3b 20 2f 2a | 20 73 65 74 20 74 6f 20 |used; /*| set to |
|000007d0| 7a 65 72 6f 20 2a 2f 0d | 7d 20 53 44 46 69 6c 65 |zero */.|} SDFile|
|000007e0| 48 65 61 64 65 72 3b 0d | 0d 09 2f 2a 20 63 72 65 |Header;.|../* cre|
|000007f0| 61 74 69 6f 6e 20 61 6e | 64 20 64 69 73 70 6f 73 |ation an|d dispos|
|00000800| 61 6c 20 6f 66 20 69 6e | 20 6d 65 6d 6f 72 79 20 |al of in| memory |
|00000810| 73 74 72 75 63 74 75 72 | 65 73 20 2a 2f 0d 4f 53 |structur|es */.OS|
|00000820| 45 72 72 20 53 44 43 72 | 65 61 74 65 28 4f 53 54 |Err SDCr|eate(OST|
|00000830| 79 70 65 20 63 72 65 61 | 74 6f 72 2c 20 4f 53 54 |ype crea|tor, OST|
|00000840| 79 70 65 20 74 79 70 65 | 2c 20 53 44 46 69 6c 65 |ype type|, SDFile|
|00000850| 20 2a 66 79 6c 65 29 3b | 0d 76 6f 69 64 20 53 44 | *fyle);|.void SD|
|00000860| 44 69 73 70 6f 73 65 28 | 53 44 46 69 6c 65 20 66 |Dispose(|SDFile f|
|00000870| 79 6c 65 29 3b 0d 0d 09 | 2f 2a 20 66 6f 72 20 63 |yle);...|/* for c|
|00000880| 6f 6e 76 65 72 73 69 6f | 6e 20 6f 66 20 69 6e 20 |onversio|n of in |
|00000890| 6d 65 6d 6f 72 79 20 73 | 74 72 75 63 74 75 72 65 |memory s|tructure|
|000008a0| 73 20 74 6f 20 63 6c 69 | 70 62 6f 61 72 64 20 66 |s to cli|pboard f|
|000008b0| 6f 72 6d 61 74 20 2a 2f | 0d 4f 53 45 72 72 20 53 |ormat */|.OSErr S|
|000008c0| 44 46 72 6f 6d 48 61 6e | 64 28 48 61 6e 64 6c 65 |DFromHan|d(Handle|
|000008d0| 20 68 2c 20 53 44 46 69 | 6c 65 2a 20 66 79 6c 65 | h, SDFi|le* fyle|
|000008e0| 29 3b 0d 4f 53 45 72 72 | 20 53 44 54 6f 48 61 6e |);.OSErr| SDToHan|
|000008f0| 64 28 53 44 46 69 6c 65 | 20 66 79 6c 65 2c 20 48 |d(SDFile| fyle, H|
|00000900| 61 6e 64 6c 65 20 2a 68 | 29 3b 0d 0d 09 2f 2a 20 |andle *h|);.../* |
|00000910| 64 69 73 6b 20 62 61 73 | 65 64 20 73 74 6f 72 61 |disk bas|ed stora|
|00000920| 67 65 20 61 6e 64 20 72 | 65 74 72 69 65 76 61 6c |ge and r|etrieval|
|00000930| 20 2a 2f 0d 4f 53 45 72 | 72 20 53 44 52 65 61 64 | */.OSEr|r SDRead|
|00000940| 28 73 68 6f 72 74 20 76 | 52 65 66 4e 75 6d 2c 20 |(short v|RefNum, |
|00000950| 6c 6f 6e 67 20 64 69 72 | 49 44 2c 20 43 6f 6e 73 |long dir|ID, Cons|
|00000960| 74 53 74 72 32 35 35 50 | 61 72 61 6d 20 66 69 6c |tStr255P|aram fil|
|00000970| 65 4e 61 6d 65 2c 20 53 | 44 46 69 6c 65 2a 20 66 |eName, S|DFile* f|
|00000980| 79 6c 65 29 3b 0d 4f 53 | 45 72 72 20 53 44 57 72 |yle);.OS|Err SDWr|
|00000990| 69 74 65 28 73 68 6f 72 | 74 20 76 52 65 66 4e 75 |ite(shor|t vRefNu|
|000009a0| 6d 2c 20 6c 6f 6e 67 20 | 64 69 72 49 44 2c 20 43 |m, long |dirID, C|
|000009b0| 6f 6e 73 74 53 74 72 32 | 35 35 50 61 72 61 6d 20 |onstStr2|55Param |
|000009c0| 66 69 6c 65 4e 61 6d 65 | 2c 20 53 44 46 69 6c 65 |fileName|, SDFile|
|000009d0| 20 66 79 6c 65 29 3b 0d | 0d 09 2f 2a 20 66 6f 72 | fyle);.|../* for|
|000009e0| 20 73 65 74 74 69 6e 67 | 20 61 6e 64 20 72 65 74 | setting| and ret|
|000009f0| 72 69 65 76 69 6e 67 20 | 74 68 65 20 72 6f 6f 74 |rieving |the root|
|00000a00| 20 69 64 20 6e 75 6d 62 | 65 72 20 2a 2f 0d 4f 53 | id numb|er */.OS|
|00000a10| 45 72 72 20 53 44 47 65 | 74 52 6f 6f 74 49 44 28 |Err SDGe|tRootID(|
|00000a20| 53 44 46 69 6c 65 20 66 | 79 6c 65 2c 20 6c 6f 6e |SDFile f|yle, lon|
|00000a30| 67 20 2a 62 61 73 65 69 | 64 29 3b 0d 4f 53 45 72 |g *basei|d);.OSEr|
|00000a40| 72 20 53 44 53 65 74 52 | 6f 6f 74 49 44 28 53 44 |r SDSetR|ootID(SD|
|00000a50| 46 69 6c 65 20 66 79 6c | 65 2c 20 6c 6f 6e 67 20 |File fyl|e, long |
|00000a60| 62 61 73 65 69 64 29 3b | 0d 0d 09 2f 2a 20 73 65 |baseid);|.../* se|
|00000a70| 74 74 69 6e 67 20 61 6e | 64 20 72 65 74 72 69 65 |tting an|d retrie|
|00000a80| 76 69 6e 67 20 74 68 65 | 20 74 79 70 65 20 61 6e |ving the| type an|
|00000a90| 64 20 63 72 65 61 74 6f | 72 20 62 79 74 65 73 20 |d creato|r bytes |
|00000aa0| 2a 2f 0d 4f 53 45 72 72 | 20 53 44 47 65 74 54 79 |*/.OSErr| SDGetTy|
|00000ab0| 70 65 49 6e 66 6f 28 53 | 44 46 69 6c 65 20 66 79 |peInfo(S|DFile fy|
|00000ac0| 6c 65 2c 20 4f 53 54 79 | 70 65 20 2a 66 69 6c 65 |le, OSTy|pe *file|
|00000ad0| 5f 74 79 70 65 2c 20 4f | 53 54 79 70 65 20 2a 66 |_type, O|SType *f|
|00000ae0| 69 6c 65 5f 63 72 65 61 | 74 6f 72 29 3b 0d 4f 53 |ile_crea|tor);.OS|
|00000af0| 45 72 72 20 53 44 53 65 | 74 54 79 70 65 49 6e 66 |Err SDSe|tTypeInf|
|00000b00| 6f 28 53 44 46 69 6c 65 | 20 66 79 6c 65 2c 20 4f |o(SDFile| fyle, O|
|00000b10| 53 54 79 70 65 20 66 69 | 6c 65 5f 74 79 70 65 2c |SType fi|le_type,|
|00000b20| 20 4f 53 54 79 70 65 20 | 66 69 6c 65 5f 63 72 65 | OSType |file_cre|
|00000b30| 61 74 6f 72 29 3b 0d 0d | 09 2f 2a 20 61 64 64 69 |ator);..|./* addi|
|00000b40| 6e 67 20 61 6e 64 20 64 | 65 6c 65 74 69 6e 67 20 |ng and d|eleting |
|00000b50| 72 65 63 6f 72 64 73 20 | 2a 2f 0d 4f 53 45 72 72 |records |*/.OSErr|
|00000b60| 20 53 44 41 64 64 52 65 | 63 6f 72 64 28 53 44 46 | SDAddRe|cord(SDF|
|00000b70| 69 6c 65 20 66 79 6c 65 | 2c 20 6c 6f 6e 67 20 2a |ile fyle|, long *|
|00000b80| 69 64 29 3b 0d 4f 53 45 | 72 72 20 53 44 52 65 6d |id);.OSE|rr SDRem|
|00000b90| 6f 76 65 52 65 63 6f 72 | 64 28 53 44 46 69 6c 65 |oveRecor|d(SDFile|
|00000ba0| 20 66 79 6c 65 2c 20 6c | 6f 6e 67 20 69 64 29 3b | fyle, l|ong id);|
|00000bb0| 0d 0d 09 2f 2a 20 69 66 | 20 79 6f 75 20 6c 6f 63 |.../* if| you loc|
|00000bc0| 6b 20 61 20 66 69 6c 65 | 2c 20 79 6f 75 20 63 61 |k a file|, you ca|
|00000bd0| 6e 20 75 73 65 20 53 44 | 47 65 74 52 65 63 6f 72 |n use SD|GetRecor|
|00000be0| 64 50 74 72 20 66 6f 72 | 0d 09 69 6e 70 6c 61 63 |dPtr for|..inplac|
|00000bf0| 65 20 61 63 63 65 73 73 | 20 74 6f 20 66 69 6c 65 |e access| to file|
|00000c00| 20 65 6c 65 6d 65 6e 74 | 73 2e 20 20 4c 6f 63 6b | element|s. Lock|
|00000c10| 65 64 20 66 79 6c 65 73 | 20 63 61 6e 6e 6f 74 0d |ed fyles| cannot.|
|00000c20| 09 62 65 20 6d 6f 64 69 | 66 69 65 64 2e 20 2a 2f |.be modi|fied. */|
|00000c30| 0d 4f 53 45 72 72 20 53 | 44 53 65 74 44 61 74 61 |.OSErr S|DSetData|
|00000c40| 4c 6f 63 6b 28 53 44 46 | 69 6c 65 20 66 79 6c 65 |Lock(SDF|ile fyle|
|00000c50| 2c 20 42 6f 6f 6c 65 61 | 6e 20 6c 6f 63 6b 69 74 |, Boolea|n lockit|
|00000c60| 29 3b 0d 4f 53 45 72 72 | 20 53 44 47 65 74 52 65 |);.OSErr| SDGetRe|
|00000c70| 63 6f 72 64 50 74 72 28 | 53 44 46 69 6c 65 20 66 |cordPtr(|SDFile f|
|00000c80| 79 6c 65 2c 20 6c 6f 6e | 67 20 69 64 2c 20 50 74 |yle, lon|g id, Pt|
|00000c90| 72 20 2a 70 29 3b 0d 4f | 53 45 72 72 20 53 44 47 |r *p);.O|SErr SDG|
|00000ca0| 65 74 52 65 63 6f 72 64 | 53 69 7a 65 28 53 44 46 |etRecord|Size(SDF|
|00000cb0| 69 6c 65 20 66 79 6c 65 | 2c 20 6c 6f 6e 67 20 69 |ile fyle|, long i|
|00000cc0| 64 2c 20 6c 6f 6e 67 20 | 2a 73 69 7a 65 29 3b 0d |d, long |*size);.|
|00000cd0| 0d 09 2f 2a 20 66 6f 72 | 20 72 65 74 72 69 65 76 |../* for| retriev|
|00000ce0| 69 6e 67 20 61 6e 64 20 | 73 65 74 74 69 6e 67 20 |ing and |setting |
|00000cf0| 72 65 63 6f 72 64 20 64 | 61 74 61 20 2a 2f 0d 4f |record d|ata */.O|
|00000d00| 53 45 72 72 20 53 44 47 | 65 74 52 65 63 6f 72 64 |SErr SDG|etRecord|
|00000d10| 28 53 44 46 69 6c 65 20 | 66 79 6c 65 2c 20 6c 6f |(SDFile |fyle, lo|
|00000d20| 6e 67 20 69 64 2c 20 76 | 6f 69 64 2a 20 64 61 74 |ng id, v|oid* dat|
|00000d30| 61 2c 20 6c 6f 6e 67 20 | 2a 63 6f 75 6e 74 29 3b |a, long |*count);|
|00000d40| 0d 4f 53 45 72 72 20 53 | 44 53 65 74 52 65 63 6f |.OSErr S|DSetReco|
|00000d50| 72 64 28 53 44 46 69 6c | 65 20 66 79 6c 65 2c 20 |rd(SDFil|e fyle, |
|00000d60| 6c 6f 6e 67 20 69 64 2c | 20 76 6f 69 64 2a 20 64 |long id,| void* d|
|00000d70| 61 74 61 2c 20 6c 6f 6e | 67 20 63 6f 75 6e 74 29 |ata, lon|g count)|
|00000d80| 3b 0d 0d 23 65 6e 64 69 | 66 0d 0d 2f 2a 20 0d 09 |;..#endi|f../* ..|
|00000d90| 65 78 61 6d 70 6c 65 3a | 0d 4f 53 45 72 72 20 45 |example:|.OSErr E|
|00000da0| 6e 63 61 70 73 75 6c 61 | 74 65 44 61 74 61 42 6c |ncapsula|teDataBl|
|00000db0| 6f 63 6b 28 76 6f 69 64 | 2a 20 74 65 73 74 5f 64 |ock(void|* test_d|
|00000dc0| 61 74 61 2c 20 6c 6f 6e | 67 20 74 65 73 74 5f 64 |ata, lon|g test_d|
|00000dd0| 61 74 61 5f 6c 65 6e 67 | 74 68 2c 20 48 61 6e 64 |ata_leng|th, Hand|
|00000de0| 6c 65 20 2a 65 64 61 74 | 61 29 20 7b 0d 09 53 44 |le *edat|a) {..SD|
|00000df0| 46 69 6c 65 20 66 79 6c | 65 20 3d 20 4e 55 4c 4c |File fyl|e = NULL|
|00000e00| 3b 0d 09 4f 53 45 72 72 | 20 65 72 72 3b 0d 09 6c |;..OSErr| err;..l|
|00000e10| 6f 6e 67 20 69 64 3b 0d | 09 66 79 6c 65 20 3d 20 |ong id;.|.fyle = |
|00000e20| 4e 55 4c 4c 3b 0d 09 2a | 65 64 61 74 61 20 3d 20 |NULL;..*|edata = |
|00000e30| 4e 55 4c 4c 3b 0d 09 69 | 66 20 28 28 65 72 72 20 |NULL;..i|f ((err |
|00000e40| 3d 20 53 44 43 72 65 61 | 74 65 28 27 44 41 54 41 |= SDCrea|te('DATA|
|00000e50| 27 2c 20 27 44 41 54 41 | 2c 20 26 66 79 6c 65 29 |', 'DATA|, &fyle)|
|00000e60| 29 20 21 3d 20 6e 6f 45 | 72 72 29 20 67 6f 74 6f |) != noE|rr) goto|
|00000e70| 20 62 61 69 6c 3b 0d 09 | 69 66 20 28 28 65 72 72 | bail;..|if ((err|
|00000e80| 20 3d 20 53 44 41 64 64 | 52 65 63 6f 72 64 28 66 | = SDAdd|Record(f|
|00000e90| 79 6c 65 2c 20 26 69 64 | 29 29 20 21 3d 20 6e 6f |yle, &id|)) != no|
|00000ea0| 45 72 72 29 20 67 6f 74 | 6f 20 62 61 69 6c 3b 0d |Err) got|o bail;.|
|00000eb0| 09 69 66 20 28 28 65 72 | 72 20 3d 20 53 44 53 65 |.if ((er|r = SDSe|
|00000ec0| 74 52 6f 6f 74 49 44 28 | 66 79 6c 65 2c 20 69 64 |tRootID(|fyle, id|
|00000ed0| 29 29 20 21 3d 20 6e 6f | 45 72 72 29 20 67 6f 74 |)) != no|Err) got|
|00000ee0| 6f 20 62 61 69 6c 3b 0d | 09 69 66 20 28 28 65 72 |o bail;.|.if ((er|
|00000ef0| 72 20 3d 20 53 44 53 65 | 74 52 65 63 6f 72 64 28 |r = SDSe|tRecord(|
|00000f00| 66 79 6c 65 2c 20 69 64 | 2c 20 74 65 73 74 5f 64 |fyle, id|, test_d|
|00000f10| 61 74 61 2c 20 74 65 73 | 74 5f 64 61 74 61 5f 6c |ata, tes|t_data_l|
|00000f20| 65 6e 67 74 68 29 29 20 | 21 3d 20 6e 6f 45 72 72 |ength)) |!= noErr|
|00000f30| 29 20 67 6f 74 6f 20 62 | 61 69 6c 3b 0d 09 69 66 |) goto b|ail;..if|
|00000f40| 20 28 28 65 72 72 20 3d | 20 53 44 54 6f 48 61 6e | ((err =| SDToHan|
|00000f50| 64 28 66 79 6c 65 2c 20 | 65 64 61 74 61 29 29 20 |d(fyle, |edata)) |
|00000f60| 21 3d 20 6e 6f 45 72 72 | 29 20 67 6f 74 6f 20 62 |!= noErr|) goto b|
|00000f70| 61 69 6c 3b 0d 09 53 44 | 44 69 73 70 6f 73 65 28 |ail;..SD|Dispose(|
|00000f80| 66 79 6c 65 29 3b 0d 09 | 72 65 74 75 72 6e 20 6e |fyle);..|return n|
|00000f90| 6f 45 72 72 3b 0d 62 61 | 69 6c 3a 0d 09 69 66 20 |oErr;.ba|il:..if |
|00000fa0| 28 66 79 6c 65 20 21 3d | 20 4e 55 4c 4c 29 20 53 |(fyle !=| NULL) S|
|00000fb0| 44 44 69 73 70 6f 73 65 | 28 66 79 6c 65 29 3b 0d |DDispose|(fyle);.|
|00000fc0| 09 72 65 74 75 72 6e 20 | 65 72 72 3b 0d 7d 0d 2a |.return |err;.}.*|
|00000fd0| 2f 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |/.......|........|
|00000fe0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ff0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001000| 00 00 01 00 00 00 01 6e | 00 00 00 6e 00 00 00 3e |.......n|...n...>|
|00001010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001030| 09 53 74 64 44 61 74 61 | 2e 68 02 00 00 00 54 45 |.StdData|.h....TE|
|00001040| 58 54 4d 50 53 20 01 00 | ff ff ff ff 00 00 00 00 |XTMPS ..|........|
|00001050| 00 00 54 45 58 54 4d 50 | 53 20 01 00 ff ff ff ff |..TEXTMP|S ......|
|00001060| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001070| 00 00 ae bb a2 fe 00 00 | 0f 51 00 00 01 ac 00 00 |........|.Q......|
|00001080| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001090| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 10 00 00 80 |........|........|
|000010e0| 07 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001100| 00 00 00 48 00 09 47 65 | 6e 65 76 61 00 00 0d 23 |...H..Ge|neva...#|
|00001110| 03 df 84 50 75 64 65 20 | 3c 4d 65 6d 6f 72 79 2e |...Pude |<Memory.|
|00001120| 68 3e 0d 0d 0d 4f 00 03 | 00 08 00 36 00 ef 02 cf |h>...O..|...6....|
|00001130| 03 56 00 36 00 ef 02 cf | 03 56 b0 5f 56 72 00 00 |.V.6....|.V._Vr..|
|00001140| 00 82 00 00 02 9b 00 00 | 00 00 01 00 00 00 00 1e |........|........|
|00001150| 00 36 00 ef 02 cf 03 56 | 00 36 00 ef 02 cf 03 56 |.6.....V|.6.....V|
|00001160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001170| 01 00 00 00 01 6e 00 00 | 00 6e 00 00 00 3e 03 d6 |.....n..|.n...>..|
|00001180| 71 38 26 32 00 00 00 1c | 00 3e 00 00 4d 50 53 52 |q8&2....|.>..MPSR|
|00001190| 00 01 00 0a 03 ed ff ff | 00 00 00 00 00 00 00 00 |........|........|
|000011a0| 03 f0 ff ff 00 00 00 4c | 03 d7 cc 10 00 00 00 00 |.......L|........|
|000011b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+